import Vue from 'vue'
import App from './App.vue'
import '../public/css/global.css'
import $ from 'jquery'
import axios from 'axios'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'
import hljs from 'highlight.js'
import "highlight.js/styles/monokai-sublime.css" //这里有多个样式，自己可以根据需要切换
import VueTouch from 'vue-touch'




//安装组件
// Vue.use(VueTinymce)
Vue.use(ElementUI);
Vue.config.productionTip = false
Vue.prototype.$ = $;
Vue.prototype.$axios = axios

Vue.directive('highlight', function (el) {
  let blocks = el.querySelectorAll('pre code');
  blocks.forEach((block) => {
    hljs.highlightBlock(block)
  })
})


Vue.use(VueTouch, { name: 'v-touch' })

VueTouch.config.swipe = {

  threshold: 50 //手指左右滑动距离

}

new Vue({
  render: h => h(App),
  router
}).$mount('#app')
